<?php
session_start();
$action = $_GET['action'];
$username = $_GET['username'];
include_once '../Model/M_EditUser.php'; 
$user = new User();
if($action == 'edit')
{
    $first_name = $_POST['first_name'];
    $father_name = $_POST['father_name'];
    $grandfather_name = $_POST['family_name'];
    $email = $_POST['email'];
    $user->editUser($username, $first_name, $father_name, $grandfather_name, $email);
    header('Location:../View/ListUser.php');
}
else if ($action == 'delete')
{
    $user->deleteUser($username);
    header('Location:../View/ListUser.php');
}
?>
